Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for anonymous class declarations in default exports #280

Merged
merged 1 commit into from
Jan 25, 2016
Merged

Add support for anonymous class declarations in default exports #280

merged 1 commit into from
Jan 25, 2016

Conversation

zjmiller
Copy link
Contributor

This is required because Esprima uses a ClassDeclaration with a null id property when parsing a default export involving an anonymous class.

This is required because Esprima uses a ClassDeclaration with a null id property when parsing a default export involving an anonymous class.
@zjmiller
Copy link
Contributor Author

I first noticed this issue when escodegen threw a TypeError: Cannot read property 'name' of null when given the Esprima AST for export default class { }.

michaelficarra added a commit that referenced this pull request Jan 25, 2016
Add support for anonymous class declarations in default exports
@michaelficarra michaelficarra merged commit c6a0c12 into estools:master Jan 25, 2016
@michaelficarra
Copy link
Member

Thanks. On a related note, we probably also get export default (class{}), export default (class{}.a), etc. wrong. You might want to confirm and then fix those as well.

@zjmiller
Copy link
Contributor Author

Cool I'll take a look.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants